package cn.tedu._01mvcboot01.Controller;

import cn.tedu._01mvcboot01.pojo.dto.VehicleAddDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class VehicleController {

    @RequestMapping("/v1/vehicle/add1")
    @ResponseBody
    public String add(String brand,String model,String price){

        return "品牌是"+brand+"型号是"+model+"价格是"+price +"添加成功1";
    }

    @RequestMapping("/v1/vehicle/add2")
    @ResponseBody
    public String add2(VehicleAddDTO vehicleAddDTO){
        String brand = vehicleAddDTO.getBrand();
        String model = vehicleAddDTO.getModel();
        String price = vehicleAddDTO.getPrice();
        return "品牌是"+brand+"型号是"+model+"价格是"+price +"添加成功2";
    }


}
